package org.spring.qq_chat_java.pojo;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.EnumOrdinalTypeHandler;
import org.spring.qq_chat_java.constant.group.Role;

import java.time.LocalDateTime;


@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("group_members")
public class GroupMembers {
    @TableId(type = IdType.AUTO)
    private Long memberId;
    private Long groupId;
    private Long userId;
    @TableField(typeHandler = EnumOrdinalTypeHandler.class)
    private Role role;
    private LocalDateTime joinTime;
}
